//!@author denglibin
//!@date 2025/11/10 10:32
//!@desc

use std::env;
use crate::dao::mysql2mysql;

///迁移数据到新表
pub async fn migrate_data()-> Result<(), Box<dyn std::error::Error>>{
    let args = env::args().collect::<Vec<String>>();
    let src_url = &args[1];
    let src_table = &args[2];
    
    let dest_url = &args[3];
    let dest_table = &args[4];
    mysql2mysql::data_migration(src_url, dest_url, src_table, dest_table).await
}